﻿using Koala.Pro.Common;
using Koala.Pro.Core;
using Koala.Pro.Core.Dto;
using Koala.Pro.Core.Models;
using Koala.Pro.Helpers;

namespace Koala.Pro.Services
{
    public interface IOuService : IMyCrudService<OuInfo, int, OuPagedDto>, ITransientDependency, IDependency
    {
        Task<List<OuInfo>> GetOUsByUser(int userID);

        Task<List<OuInfo>> GetTopGroup();

        Task<List<OuInfo>> GetAllByParent(int parentId);

        Task<List<OuInfo>> GetTreeByID(int parentId);

        Task<List<OuInfo>> GetGroupCompany();

        Task<List<OuInfo>> GetGroupCompanyTree();

        Task<List<OuInfo>> GetAllCompany(int groupId);

        Task<List<OuInfo>> GetOUsByRole(int roleID);

        Task<bool> SetDeletedFlag(int id, bool deleted = true);

        Task<OuInfo> FindByName(string name);

        Task<bool> AddUser(int userID, int ouID);

        Task<bool> RemoveUser(int userID, int ouID);

        Task<string> GetName(int id);

        Task<List<TreeNodeItem>> GetOUCategorysDictJson();
    }
}
